import request from '@/utils/request'

// 组织管理查询列表
export function fetchList(query) {
  return request({
    url: '/organization/list',
    method: 'post',
    data: query
  })
}

// 组织管理查询详情
export function organizationDetail(id) {
  return request({
    url: '/organization/get/' + id,
    method: 'post',
  })
}

// 组织信息创建
export function createOrganization(query) {
  return request({
    url: '/organization/create',
    method: 'post',
    data: query
  })
}

//组织信息删除
export function deleteOrganization(data) {
  return request({
    url: '/organization/delete',
    method: 'get',
    data
  })
}

//组织信息编辑
export function updateOrganization(query) {
  return request({
    url: '/organization/update',
    method: 'post',
    data: query
  })
}


// 用户可授权的组织{机构id}
export function listOrgs(data) {
  return request({
    url: '/auth/listAuthOrganization',
    method: 'post',
    headers: { 'Content-Type': 'application/json' },
    data
  })
}